package com.huluobo.a2308douyindemo.net

import com.huluobo.a2308douyindemo.bean.CartBean
import com.huluobo.a2308douyindemo.bean.GIftBean
import com.huluobo.a2308douyindemo.bean.GoodsBean
import com.huluobo.a2308douyindemo.bean.GoodsCommentBean
import com.huluobo.a2308douyindemo.bean.User7012Bean
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 *  Created by LC on 2025/10/30.
 *  单独使用7012的接口的地址
 */
interface ApiServiceGift {
    @GET(Const.URL_GET_GIFT)
    suspend fun getGift(): Res<List<GIftBean>>

    @POST(Const.URL_LOGIN_7012)
    suspend fun login(@Body body: RequestBody): Res<User7012Bean>

    @GET(Const.URL_GET_GOODS_INFO)
    suspend fun getGoodsInfo(
        @Query(Const.PARAM_CATEGORY_ID) categoryId: Int,
        @Query(Const.PARAM_CURRENT_PAGE) currentPage: Int,
        @Query(Const.PARAM_PAGE_SIZE_GOODS) pageSIze: Int
    ): Res<List<GoodsBean>>

    @GET(Const.URL_GET_GOODS_DETAIL)
    suspend fun getGoodsDetail(@Query(Const.PARAM_GOODS_ID) goodId: Int): Res<GoodsBean>

    @GET(Const.URL_GET_GOODS_COMMENT)
    suspend fun getGoodsComment(): Res<List<GoodsCommentBean>>

    @POST(Const.URL_ADD_TO_CART)
    suspend fun addToCart(@Body body: RequestBody): Res<Any>

    @GET(Const.URL_GET_CART)
    suspend fun getCart(): Res<List<CartBean>>

    @POST(Const.URL_DELETE_CART)
    suspend fun deleteCart(@Body body: RequestBody): Res<String>
}